/**
 * 本地缓存demo
 */
import 'package:flutter_benchu/utils/commonPkg.dart';

class CacheDemoPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _CacheDemoPageState();
}

class _CacheDemoPageState extends State<CacheDemoPage> {
  
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('本地缓存')),
      body: Column(
        children: [
          InkWell(
            onTap: (){
              cacheModel.email='1192487554@qq.com';
              cacheModel.phone='13125441497';
              // 保存到本地
              cacheModel.setLoaclCache();
              Log.v("已缓存数据到本地");
            },
            child: Text("点击我缓存数据到本地"),
          ),
        ],
      ),
    );
  }
}
